7512-20130-G2-TP1.pdf: tex/taylor.part.tex tex/nr.part.tex \
		tex/7512-20130-G2-TP1.tex
	cd tex; pdflatex 7512-20130-G2-TP1.tex; mv $@ ..

tex/taylor.part.tex: octave/TP1T.m
	octave --eval "TP1T('$@')" --path octave/

tex/nr.part.tex: octave/TP1NR.m
	octave --eval "TP1NR('$@')" --path octave/

tidy:
	cd tex; rm -rf `ls -A | grep -v '\.tex$$'`

archive: 7512-20130-G2-TP1.pdf tidy
	cd ..; zip -r G02_TP1 TP1 -x `grep -v pdf .gitignore`

clean: tidy
	rm -f 7512-20130-G2-TP1.pdf

